<%@page import="ua.org.energy.vkek.site.server.EMF"%>
<%@page import="ua.org.energy.vkek.site.server.CategoryUtils"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@page import="java.util.List"%>
<%@page import="ua.org.energy.vkek.site.web.JSPHelper" %>
<%@page import="ua.org.energy.vkek.site.server.CategoryUtils"%>
<%@page import="ua.org.energy.vkek.site.model.ArticleCategory"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" 
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="ru" xml:lang="ru">
    <head>
        <meta http-equiv="content-type" content="text/html; charset=UTF-8" />
        <title>testcase Jsp</title>
        <link rel="stylesheet" href="css/lern.css"/>
    </head>
    <body>
        <div id="wrap">
            <div id="header" class="bordered">
                <h1>Восточно-Крымская Энергетическая Компания</h1></div>
            <div id="nav" class="bordered">
                <ul>
                    <%
                        CategoryUtils utils = new CategoryUtils(EMF.getEM());
                        List<ArticleCategory> list = utils.listAll();
                        for (ArticleCategory cat : list) {
                            out.println("<li><a href=\"#\">" + cat.getCategoryName() + "</a></li>");
                        }
                    %>
                </ul>
            </div>
            <div id="main">
                <div class="article-waper bordered">
                    <div class="article-text">
                        <h2>Статья 1</h2>
                        <p>
                            Lorem ipsum dolor sit amet, consectetur adipisicing elit, 
                            sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. 
                            Lorem ipsum dolor sit amet, consectetur adipisicing elit, 
                            sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. 
                            Lorem ipsum dolor sit amet, consectetur adipisicing elit, 
                            sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. 
                            Lorem ipsum dolor sit amet, consectetur adipisicing elit, 
                            sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. 
                            Lorem ipsum dolor sit amet, consectetur adipisicing elit, 
                            sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. 
                        </p>
                    </div>
                    <div class="article-desc">
                        article description and date
                    </div>
                </div>
                                <div class="article-waper bordered">
                    <div class="article-text">
                        <h2>Статья 2</h2>
                        <p>
                            Lorem ipsum dolor sit amet, consectetur adipisicing elit, 
                            sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. 
                            Lorem ipsum dolor sit amet, consectetur adipisicing elit, 
                            sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. 
                            Lorem ipsum dolor sit amet, consectetur adipisicing elit, 
                            sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. 
                            Lorem ipsum dolor sit amet, consectetur adipisicing elit, 
                            sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. 
                            Lorem ipsum dolor sit amet, consectetur adipisicing elit, 
                            sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. 
                        </p>
                    </div>
                    <div class="article-desc">
                        article description and date
                    </div>
                </div>

            </div>

            <div id="sidebar">

                <div id="tags" class="bordered">
                    <h3>В этом разделе</h3>
                    <ul>
                        <li><a href="#">Ссылка 1</a></li>
                        <li><a href="#">Ссылка 2</a></li>
                    </ul>
                </div>

                <div id="news" class="bordered">
                    <h3>Новости</h3>
                    <p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit...</p>
                    <ul>
                        <li><a href="#">Ссылка 1</a></li>
                        <li><a href="#">Ссылка 2</a></li>
                    </ul>
                </div>

            </div>
            <div id="footer" class="bordered">
                <p>Подвал</p>
            </div>
        </div>
    </body>
</html>
